package com.os.sys.controller;

import com.os.sys.common.utility.PubClass;
import com.os.sys.common.utility.XJsonInfo;
import com.os.sys.model.T_SYS_AppVersion;
import com.os.sys.repository.AppVersionRepository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2016/12/13.
 */

@RestController
@RequestMapping("/api/sys/appversion")
public class AppVersionController {
    @Resource
    private AppVersionRepository appVersionRepository;
    @Resource
    private PubClass pubClass;

    @RequestMapping("/getModel")
    public XJsonInfo getModel(String key) {
        T_SYS_AppVersion info = appVersionRepository.findById("key").orElse(null);
        return new XJsonInfo().setData(info);
    }
}
